<template>
  <div class="content-block">
    <div class="info-head">{{ title }}</div>
    <div class="info-content">
      <v-chart :option="chartOption" style="width: 100%;height: 400px;"></v-chart>
    </div>
  </div>
</template>

<script>
export default {
  name: 'grid-item-four',
  props: {
    title: String,
    info: {
      type: Array,
      default () {
        return []
      }
    }
  },
  computed: {
    chartOption () {
      return {
        legend: {
          left: 'center'
        },
        tooltip: {
          trigger: 'item'
        },
        series: [
          {
            name: this.title,
            type: 'pie',
            radius: [50, 130],
            center: ['50%', '50%'],
            roseType: 'area',
            itemStyle: {
              borderRadius: 8
            },
            data: this.info
          }
        ]
      }
    }
  }
}
</script>

<style scoped>

</style>
